<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/flight.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <link href="/js/datepicker/datepicker.css" rel="stylesheet" type="text/css">
    <script src="/js/datepicker/datepicker.js"></script>

    <script>
        $(function () {
            var year = new Date().getFullYear();
            var month = new Date().getMonth();
            var date = new Date().getDate() + 1;
            $('#round_way_btn').click(function () {
                alert("仅支持使用骡窝窝app预定往返机票");
            });

            $("#departime").val(year + "-" + month + "-" + date);

            $("#search").click(function () {
                var depart = $("#departCity").val();
                var dest = $("#destCity").val();
                var time = $("#departime").val();
                window.location.href = "http://localhost:8888/flight/list?source=" + depart + "&dest=" + dest + "&time=" + time;
            });
            $('[data-toggle="datepicker"]').datepicker({
                format: 'yyyy-mm-dd',
                startDate: new Date(),
                months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                daysMin: ['日', '一', '二', '三', '四', '五', '六'],
                autoHide: true
            });
            $(".switch").click(function () {
                var from = $("#departCity").val();
                $("#departCity").val($("#destCity").val());
                $("#destCity").val(from);
            });
            $(".test").click(function () {
                var source = $(".line");
                window.location.href = "http://localhost:8888/flight/list?source=" + source + "&dest=" + dest + "&time=" + year + "-" + month + "-" + date;
            });
        })
    </script>
</head>
<body>
<#assign currentNav="flight">
<#include "../common/navbar.ftl">

<div class="container ng-scope" ng-controller="indexController">
    <div class="m-title"><i class="icon-flight"></i>国内机票</div>
    <div class="fm flight">
        <div class="book-form">
            <ul class="book-tab">
                <li class="on" id="one_way_btn" ng-click="setOneWay()"><a href="javascript:"><i
                                class="icon-go"></i>单程</a>
                </li>
                <li class="" id="round_way_btn" ng-click="setRonudWay()"><a href="javascript:"><i
                                class="icon-round"></i>往返</a></li>
            </ul>
            <div class="book-content">
                <div class="item">
                    <span class="label">出发城市</span>
                    <div class="inp-wrap">
                        <label><input class="ng-pristine ng-valid" id="departCity" ng-model="departCityName"
                                      placeholder="中文/拼音/简拼"
                                      type="text"></label>
                    </div>
                </div>
                <span class="switch"><a href="javascript:;" ng-click="switchCity()">换</a></span>
                <div class="item">
                    <span class="label">到达城市</span>
                    <div class="inp-wrap">
                        <label><input class="ng-pristine ng-valid" id="destCity" ng-model="destCityName"
                                      placeholder="中文/拼音/简拼"
                                      type="text"></label>
                    </div>
                </div>
                <div class="item">
                    <span class="label">出发日期</span>
                    <div class="inp-wrap">
                        <input id="departime" type="text" class="datepicker-bottom-right" data-toggle="datepicker"
                               class="icon-calendar"><i class="icon-calendar"></i>
                    </div>
                </div>
                <div class="item item-btn"><a href="javascript:" id="search"><i></i>搜索</a></div>
            </div>
        </div>

        <div class="flight-focus">
            <div class="flight-slide" data-mes-g="0-2" data-mes-t="轮播图区域" data-slide="1"
                 style="position: relative; overflow: hidden;">
                <img alt="广告图标" id="ad" src="/static/images/wKgE2l0IoqiADHpKAAItDErw7lk257.png">
                <ul class="slide-img" data-mes-g="0-2-0" data-mes-t="轮播图" style="width:3650px;">
                    <li style="position: absolute; width: 730px;">
                        <a href="http://jipiao.jd.com/" target="_blank" data-index="0" data-url="" data-param="扫码购机票"
                           data-source="www">
                            <img src="https://b3-q.mafengwo.net/s14/M00/1B/6B/wKgE2l0IoqiADHpKAAItDErw7lk257.png?imageMogr2%2Fthumbnail%2F%21620x350r%2Fgravity%2FCenter%2Fcrop%2F%21620x350%2Fquality%2F100"
                                 height="350" width="620">
                        </a>
                    </li>
                </ul>
                <ul class="slide-nav" data-mes-g="0-2-1" data-mes-t="导航区">

                    <li class="on" data-mes-g="0-2-1-0" data-mes-t="导航0">扫码购机票</li>
                </ul>
                <span class="slide-btn btn-left" data-btn-prev="1" data-mes-g="0-2-2" data-mes-t="控制左"
                      style="display: none;"><i></i></span>
                <span class="slide-btn btn-right" data-btn-next="1" data-mes-g="0-2-3" data-mes-t="控制右"
                      style="display: none;"><i></i></span>
            </div>

        </div>

    </div>
    <div class="fm service">
        <ul>
            <li class="s1"><i></i>100%航协认证</li>
            <li class="s2"><i></i>出行保证</li>
            <li class="s3"><i></i><span>7x24小时服务<br><strong>4006345678</strong></span></li>
        </ul>
    </div>

    <div class="m-title"><i class="icon-ticket"></i>特价机票</div>

    <div class="fm tejia">
        <div class="figure">
            <a class="item"
               href="http://localhost:8888/flight/list?source=%E5%B9%BF%E5%B7%9E&dest=%E5%8C%97%E4%BA%AC&time=2019-07-24"
               ng-click="searchLocationHot(hotlines.loc_depart[0])">
                <img height="140"
                     src="http://n4-q.mafengwo.net/s7/M00/2E/D4/wKgB6lSgx0KAAtuCAAVoSPI1DUk40.jpeg?imageMogr2%2Fthumbnail%2F%21750x563r%2Fgravity%2FCenter%2Fcrop%2F%21750x563%2Fquality%2F90"
                     width="225">
                <div class="title">
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[0].departCity">广州</d>
                    -
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[0].destCity">北京</d>
                    <span class="s-pull">￥<d class="ng-binding"
                                             ng-bind="hotlines.loc_depart[0].price">682</d></span>
                </div>
            </a>
            <a class="item" href="javascript:" ng-click="searchLocationHot(hotlines.loc_depart[1])">
                <img height="140"
                     src="http://p2-q.mafengwo.net/s7/M00/6D/1B/wKgB6lSuVEKABi4KAAVchdZie70489.png?imageMogr2%2Fthumbnail%2F%21750x563r%2Fgravity%2FCenter%2Fcrop%2F%21750x563%2Fquality%2F90"
                     width="225">
                <div class="title">
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[1].departCity">广州</d>
                    -
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[1].destCity">天津</d>
                    <span class="s-pull">￥<d class="ng-binding" ng-bind="hotlines.loc_depart[1].price">780</d></span>
                </div>
            </a>
            <a class="item" href="javascript:" ng-click="searchLocationHot(hotlines.loc_depart[2])">
                <img height="140"
                     src="http://b2-q.mafengwo.net/s5/M00/7B/37/wKgB3FIDDByAcTAFAAPaSajnMyk40.jpeg?imageMogr2%2Fthumbnail%2F%21750x563r%2Fgravity%2FCenter%2Fcrop%2F%21750x563%2Fquality%2F90"
                     width="225">
                <div class="title">
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[2].departCity">广州</d>
                    -
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[2].destCity">太原</d>
                    <span class="s-pull">￥<d class="ng-binding" ng-bind="hotlines.loc_depart[2].price">701</d></span>
                </div>
            </a>
            <a class="item" href="javascript:" ng-click="searchLocationHot(hotlines.loc_depart[3])">
                <img height="140"
                     src="http://b4-q.mafengwo.net/s5/M00/53/D1/wKgB3FGcJuCAFdf1AAM-uEqmHBw07.jpeg?imageMogr2%2Fthumbnail%2F%21750x563r%2Fgravity%2FCenter%2Fcrop%2F%21750x563%2Fquality%2F90"
                     width="225">
                <div class="title">
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[3].departCity">广州</d>
                    -
                    <d class="ng-binding" ng-bind="hotlines.loc_depart[3].destCity">大连</d>
                    <span class="s-pull">￥<d class="ng-binding" ng-bind="hotlines.loc_depart[3].price">839</d></span>
                </div>
            </a>
        </div>
        <div class="list hotline ng-scope" data-hotline-id="0" ng-repeat="line in hotlines.hot_depart track by $index"
             style="">
            <ul class="clearfix">
                <#list list as t>
                    <li class="ng-scope test" ng-click="searchHotLine(one)" ng-repeat="one in line.list">
                        <span class="line"><d class="ng-binding one" ng-bind="one.org_city_name">${t.source}</d> - <d
                                    class="ng-binding two" ng-bind="one.dst_city_name">${t.destination}</d></span>
                        <span class="time ng-binding" ng-bind="one.show_date"></span>
                        <span class="price">
                            <span class="ng-scope" ng-if="one.discount / 10 <= 0">特价</span>
                        </span>
                        <span class="mfw-price">￥<d class="ng-binding" ng-bind="one.price">${t.price}</d></span>
                        </a>
                    </li>
                </#list>
            </ul>
        </div>
    </div>
</div>
</div>
<#include "../common/footer.ftl">
</body>

</html>
